﻿<%@ Page Title="Family Member Profile" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FamilyMember-Detail.aspx.cs" Inherits="Teacher_FamilyMember_Detail" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolKit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>Teacher Profile</title>
    <script src="../include/js/form.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContentTop" Runat="Server">
    <h1>Family Profile</h1>
    <h3>Setting up Family profile.</h3>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="bodyContent" Runat="Server">
    <div class="elements_inner_wrapper">
        <div id="contentBody">
            <div class="section">
                <div class="seperator">
                </div>
                <fieldset class="formouter">
                    <table cellpadding="3" cellspacing="3" width="100%">
                        <tr>
                            <td colspan="2">
                                <div class="row_curved" id="divSchoolList" runat="server" title="Example:UCSM, MIT, YTU">
                                    <label for="<%=ddlSchoolList.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Selected School Name" ID="Label2" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:DropDownList AutoPostBack="True" runat="server" ID="ddlSchoolList" OnSelectedIndexChanged="ddlSchoolList_SelectedIndexChanged"
                                                DataSourceID="ObjectDataSource1" DataTextField="ListText" DataValueField="ListValue" />
                                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="SIS.ENT.Listing"
                                                DeleteMethod="Delete" OldValuesParameterFormatString="original_{0}" SelectMethod="GetList"
                                                TypeName="SIS.BLL.ListingManager" UpdateMethod="Save">
                                                <SelectParameters>
                                                    <asp:Parameter DefaultValue="1" Name="ListType" Type="Int32" />
                                                </SelectParameters>
                                            </asp:ObjectDataSource>
                                            <br />
                                            <br />
                                            <asp:Button runat="server" ID="btnAddNewTeacher" Text="Add New Teacher" OnClick="btnAddNewTeacher_Click" />
                                            &nbsp;&nbsp;<asp:Button runat="server" ID="btnViewTeacherList" Text="View Teacher List"
                                                OnClick="btnViewTeacherList_Click" />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div id="divTeacherProfile" runat="server" visible="false">
                                    <h2>Select Teacher</h2>
                                    <asp:GridView ID="grvTeacherProfile" runat="server" AutoGenerateColumns="False" DataKeyNames="UserAccountKey"
                                        CellPadding="4" Width="750px" DataSourceID="sqlDSTeacherList" ForeColor="#333333"
                                        GridLines="None" OnSelectedIndexChanged="grvTeacherProfile_SelectedIndexChanged">
                                        <RowStyle BackColor="#EFF3FB" />
                                        <Columns>
                                            <asp:BoundField DataField="TeacherProfileKey" HeaderText="TeacherProfileKey" InsertVisible="False"
                                                ReadOnly="True" SortExpression="TeacherProfileKey" Visible="False" />
                                            <asp:BoundField DataField="TeacherProfileKey" HeaderText="ID" SortExpression="TeacherProfileKey" />
                                            <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
                                            <asp:BoundField DataField="LastName" HeaderText="SurName" SortExpression="LastName" />
                                            <asp:BoundField DataField="OtherName" HeaderText="OtherName" SortExpression="OtherName" />
                                            <asp:BoundField DataField="CreatedDateTime" HeaderText="CreatedDateTime" SortExpression="CreatedDateTime"
                                                Visible="False" />
                                            <asp:BoundField DataField="ModifiedDateTime" HeaderText="ModifiedDateTime" ReadOnly="True"
                                                SortExpression="ModifiedDateTime" />                                            
                                            <asp:CommandField ShowSelectButton="True" ButtonType="Link" />
                                        </Columns>
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <EmptyDataTemplate>ac
                                            Please add new Teacher of selected school.
                                        </EmptyDataTemplate>
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <EditRowStyle BackColor="#2461BF" />
                                        <AlternatingRowStyle BackColor="White" />
                                    </asp:GridView>
                                    <asp:SqlDataSource ID="sqlDSTeacherList" runat="server" ConnectionString="<%$ ConnectionStrings:sis.dbconn %>"
                                        SelectCommand="sprocTeacherProfileTableSelectList" SelectCommandType="StoredProcedure">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="ddlSchoolList" Name="SchoolKey" PropertyName="SelectedValue"
                                                Type="Int32" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                                </div>
                                <div id="divTeacherDetails" runat="server" visible="false">
                                    <asp:HyperLink runat="server" ID="hplTeacher" Text="Edit Teacher Details" NavigateUrl="~/Teacher/Teachers-List.aspx"></asp:HyperLink>
                                    <table cellpadding="5" cellspacing="3" width="100%" style="background-color: #ffffcc;">
                                        <tr>
                                            <td>
                                                <b>Teacher Name</b>
                                            </td>
                                            <td>
                                                :
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="lblTeacherFullName" Font-Size="Medium" Font-Bold="true" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <b>NRIC Number</b>
                                            </td>
                                            <td>
                                                :
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="lblTeacherNRICNumber" Font-Size="Medium" Font-Bold="true" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <b>Contact Info</b>
                                            </td>
                                            <td>
                                                :
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="lblTeacherContactInfo" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <b>Resident Address</b>
                                            </td>
                                            <td>
                                                :
                                            </td>
                                            <td>
                                                <asp:Label runat="server" ID="lblTeacherAddressInfo" />
                                                <div runat="server" id="divTeacherAddressInfo">
                                                    <div class="row_curved" id="divSRUnitNo" runat="server">
                                                        <label for="<%=txtSRUnitNo.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="UnitNo" ID="Label3" /></label>
                                                        <div class="field">
                                                            <span class="indicator">
                                                                <asp:TextBox ID="txtSRUnitNo" Width="120px" MaxLength="20" runat="server" />
                                                                <asp:RequiredFieldValidator ID="rfvSRUnitNo" ValidationGroup="FamilyMemberProfile" ControlToValidate="txtSRUnitNo"
                                                                    runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                    <div class="row_curved" id="divSRStreetName" runat="server">
                                                        <label for="<%=txtSRStreetName.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="Street Name" ID="Label5" /></label>
                                                        <div class="field">
                                                            <span class="indicator">
                                                                <asp:TextBox ID="txtSRStreetName" Width="270px" MaxLength="255" runat="server" />
                                                                <asp:RequiredFieldValidator ID="rfvSRStreetName" ValidationGroup="FamilyMemberProfile"
                                                                    ControlToValidate="txtSRStreetName" runat="server" CssClass="validationErrorControl"
                                                                    Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                    <div class="row_curved" id="divSRCountry" runat="server">
                                                        <label for="<%=ddlSRCountry.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="Country" ID="Label6" /></label>
                                                        <div class="field">
                                                            <span class="indicator">
                                                                <asp:DropDownList Width="100px" runat="server" ID="ddlSRCountry" OnSelectedIndexChanged="ddlSRCountry_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvSRCountry" ValidationGroup="FamilyMemberProfile" ControlToValidate="ddlSRCountry"
                                                                    InitialValue="-1" runat="server" CssClass="validationErrorControl" Display="Dynamic"
                                                                    ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                            <label for="<%=ddlSRDistrict.ClientID%>" style="width: 40px" class="mand_red">
                                                                <asp:Label runat="server" Text="State/Div" ID="Label7" /></label>
                                                            <span class="indicator">
                                                                <asp:DropDownList Width="100px" runat="server" ID="ddlSRDistrict" OnSelectedIndexChanged="ddlSRDistrict_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvSRDistrict" ValidationGroup="FamilyMemberProfile"
                                                                    ControlToValidate="ddlSRDistrict" InitialValue="-1" runat="server" CssClass="validationErrorControl"
                                                                    Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                    <div class="row_curved" id="divSRCity" runat="server">
                                                        <label for="<%=ddlSRCity.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="City Name" ID="Label8" /></label>
                                                        <div class="field">
                                                            <span class="indicator">
                                                                <asp:DropDownList Width="100px" runat="server" ID="ddlSRCity">
                                                                </asp:DropDownList>
                                                                <asp:RequiredFieldValidator ID="rfvSRCity" ValidationGroup="FamilyMemberProfile" ControlToValidate="ddlSRCity"
                                                                    InitialValue="-1" runat="server" CssClass="validationErrorControl" Display="Dynamic"
                                                                    ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                            <label for="<%=txtSRPostCode.ClientID%>" style="width: 40px" class="mand_red">
                                                                <asp:Label runat="server" Text="Postal" ID="Label9" /></label>
                                                            <span class="indicator">
                                                                <asp:TextBox Width="100px" ID="txtSRPostCode" MaxLength="50" runat="server" />
                                                                <asp:RequiredFieldValidator ID="rfvSRPostCode" ValidationGroup="FamilyMemberProfile"
                                                                    ControlToValidate="txtSRPostCode" runat="server" CssClass="validationErrorControl"
                                                                    Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                        </div>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <h2>Teacher And Family Relation List</h2>
                                <asp:GridView ID="gvFamilyMemberList" runat="server" AutoGenerateColumns="False" DataKeyNames="RelationshipID,UserAccountKey,FamilyMemberProfileKey,FamilyMemberUserAccountKey"
                                    CellPadding="4" Width="750px" ForeColor="#333333" GridLines="None" OnSelectedIndexChanged="gvFamilyMemberList_SelectedIndexChanged" OnRowDeleting="gvFamilyMemberList_RowDeleting">
                                    <RowStyle BackColor="#EFF3FB" />
                                    <Columns>                                         
                                        <asp:BoundField DataField="UserAccountKey" HeaderText="UserAccountKey" SortExpression="UserAccountKey"
                                            Visible="False" />
                                        <asp:BoundField DataField="FamilyMemberProfileKey" HeaderText="FamilyMemberProfileKey" SortExpression="FamilyMemberProfileKey"
                                            Visible="False" />
                                        <asp:BoundField DataField="RelationshipTypeCode" HeaderText="RelationshipTypeCode"
                                            SortExpression="RelationshipTypeCode" Visible="False" />
                                        <asp:BoundField DataField="FamilyMemberUserAccountKey" HeaderText="FamilyMemberUserAccountKey"
                                        SortExpression="FamilyMemberUserAccountKey" Visible="False" />
                                        <asp:BoundField DataField="FullName" HeaderText="Full Name" SortExpression="FullName" />
                                        <asp:BoundField DataField="OtherName" HeaderText="Other Name" SortExpression="OtherName" />
                                        <asp:BoundField DataField="RelationshipDesc" HeaderText="Relation" SortExpression="RelationshipDesc" />
                                        <asp:BoundField DataField="EmergencyContact" HeaderText="Emergency Contact" SortExpression="EmergencyContact" />                                        
                                        <asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" />
                                        <asp:BoundField DataField="CreatedDateTime" HeaderText="CreatedDateTime" SortExpression="CreatedDateTime"
                                            Visible="False" />
                                        <asp:BoundField DataField="ModifiedDateTime" HeaderText="ModifiedDateTime" SortExpression="ModifiedDateTime" />
                                        <asp:CommandField ShowSelectButton="True"  />
                                        <asp:CommandField ShowDeleteButton="True" ButtonType="Link" />
                                    </Columns>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <EmptyDataTemplate>
                                        Please add new Family Member of selected Teacher.
                                    </EmptyDataTemplate>
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                                
                            </td>
                        </tr>
                    </table>
                    <div>
                        <asp:Label runat="server" ID="lblTopMessage" Text="" Font-Bold="true" Font-Size="Large"
                            ForeColor="Red"></asp:Label>
                        <asp:ValidationSummary ID="vsTeacherProfile" runat="server" ValidationGroup="FamilyMemberProfile"
                            ShowSummary="True" HeaderText="Please complete all highlighted fields of the form. Thank you."
                            CssClass="errorSummary" />
                        <div id="Div1" runat="server" visible="false">
                            SchoolKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblSchoolKey" /><br />
                            lblTeacherUserAccountKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblTeacherUserAccountKey" /><br />                           
                            lblTeacherProfileKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblTeacherProfileKey" /><br />
                            lblTeacherContactKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblTeacherContactKey" /><br />
                            lblTeacherAddressKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblTeacherRAddressKeyDelete" /><br />
                            lblTeacherAddressKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblTeacherPAddressKeyDelete" /><br />
                            lblTeacherAddressKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblTeacherMAddressKeyDelete" /><br />
                            lblFamilyMemberAccountKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblFamilyMemberAccountKey" /><br />
                            lblFamilyMemberAccountAuthCode:<asp:Label Visible="true" runat="server" Text="-1" ID="lblFamilyMemberAccountAuthCode" /><br />
                            lblFamilyMemberProfileKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblFamilyMemberProfileKey" /><br />
                            lblFamilyMemberContactKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblFamilyMemberContactKey" /><br />
                            lblFamilyMemberPAddressKey:<asp:Label Visible="true" runat="server" Text="-1" ID="lblFamilyMemberPAddressKey" /><br />                             
                            lblTeacherFamilyMemberRelationTypeKey:<asp:Label Visible="true" runat="server" Text="-1"
                                ID="lblTeacherFamilyMemberRelationTypeKey" />
                        </div>
                    </div>
                    <div class="row_curved" id="divGSRelationShip" runat="server" title="Example:UCSM, MIT, YTU">
                        <label for="<%=ddlGSRelation.ClientID%>" class="mand_red">
                            <asp:Label runat="server" Text="Relation" ID="lblGSRelation" /></label>
                        <div class="field">
                            <span class="indicator">
                                <asp:DropDownList runat="server" ID="ddlGSRelation" />
                                <asp:RequiredFieldValidator ID="rfvGSRelation" ValidationGroup="FamilyMemberProfile"
                                    ControlToValidate="ddlGSRelation" runat="server" CssClass="validationErrorControl"
                                    Display="Dynamic" ErrorMessage="" InitialValue="-1"></asp:RequiredFieldValidator>
                            </span>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <AjaxToolKit:TabContainer ID="tbcEntry" runat="server" Enabled="true" Visible="true">

                        <AjaxToolKit:TabPanel ID="tbpInfo" runat="server" HeaderText="Information" CssClass="menuHeader"
                            Visible="true">
                            <HeaderTemplate>
                                <asp:Label ID="lblInfoHeader" CssClass="menuHeader" runat="server">Information</asp:Label>
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table cellpadding="3" cellspacing="3" width="100%">
                                    <tr>
                                        <td>
                                            <div class="row_curved" id="divFirstName" runat="server" title="Example:Mg Mg, Kyaw Kyaw, Yu Yu">
                                                <label for="<%=txtFirstName.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="First Name" ID="lblFirstName" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="270px" ID="txtFirstName" MaxLength="50" runat="server" />
                                                        <asp:RequiredFieldValidator ID="rfvFirstName" ValidationGroup="FamilyMemberProfile" ControlToValidate="txtFirstName"
                                                            runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divLastName" runat="server">
                                                <label for="<%=txtLastName.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Last Name (SurName)" ID="lblLastName" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="270px" ID="txtLastName" MaxLength="255" runat="server" />
                                                        <asp:RequiredFieldValidator ID="rfvLastName" ValidationGroup="FamilyMemberProfile" ControlToValidate="txtLastName"
                                                            runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divOtherName" runat="server">
                                                <label for="<%=txtOtherName.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Other Name" ID="lblOtherName" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="270px" ID="txtOtherName" MaxLength="255" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="div8" runat="server">
                                                <label for="<%=ddlGender.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Gender" ID="Label16" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList ID="ddlGender" runat="server">
                                                            <asp:ListItem Text="Male" Value="M" />
                                                            <asp:ListItem Text="Female" Value="F" />
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divDOB" runat="server">
                                                <label for="<%=ddlDOBYear.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="DOB" ID="Label1" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlDOBDay">
                                                            <asp:ListItem Text="dd" Value="-1"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:DropDownList runat="server" ID="ddlDOBMonth">
                                                            <asp:ListItem Text="mm" Value="-1"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:DropDownList runat="server" ID="ddlDOBYear">
                                                            <asp:ListItem Text="yy" Value="-1"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:CustomValidator ID="csvDOB" ValidationGroup="FamilyMemberProfile" OnServerValidate="DOB_ServerSideValidation"
                                                            ControlToValidate="ddlDOBYear" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage=""></asp:CustomValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divNRICNumber" runat="server">
                                                <label for="<%=txtNRICNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="NRIC Number" ID="lblNRICNumber" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox ID="txtNRICNumber" Width="270px" runat="server" />
                                                        <asp:RequiredFieldValidator ID="rfvNRICNumber" ValidationGroup="FamilyMemberProfile"
                                                            ControlToValidate="txtNRICNumber" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divMaritalStatus" runat="server">
                                                <label for="<%=ddlMaritalStatus.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Marital Status" ID="lblMaritalStatus" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlMaritalStatus">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>                                           
                                        </td>
                                        
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </AjaxToolKit:TabPanel>
                        
                        <AjaxToolKit:TabPanel ID="tbpOtherDetail" runat="server" HeaderText="Information"
                            CssClass="menuHeader" Visible="true">
                            <HeaderTemplate>
                                <asp:Label ID="Label4" CssClass="menuHeader" runat="server">Other Details</asp:Label>
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table cellpadding="3" cellspacing="3" width="100%">
                                    <tr>
                                        <td>
                                            <div class="row_curved" id="divDrivingLicenceType" runat="server">
                                                <label for="<%=ddlDrivingLicenceType.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Driving Licence Type" ID="lblDrivingLicenceType" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlDrivingLicenceType">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divDrivingLicenceNumber" runat="server">
                                                <label for="<%=txtDrivingLicenceNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Driving Licence No." ID="lblDrivingLicenceNumber" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtDrivingLicenceNumber" MaxLength="50" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divTravelDocType" runat="server">
                                                <label for="<%=ddlTravelDocType.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Travel Document Type" ID="lblTravelDocType" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlTravelDocType">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divTravelDocNumber" runat="server">
                                                <label for="<%=txtTravelDocNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Travel Document Number" ID="lblTravelDocNumber" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtTravelDocNumber" MaxLength="50" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="row_curved" id="divBloodGroup" runat="server">
                                                <label for="<%=ddlBloodGroup.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Blood Group" ID="lblBloodGroup" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlBloodGroup">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divRaceCode" runat="server">
                                                <label for="<%=ddlRaceCode.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Race" ID="lblRaceCode" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlRaceCode">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divReligion" runat="server">
                                                <label for="<%=ddlReligion.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Religion" ID="lblReligion" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlReligion">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divNationality" runat="server">
                                                <label for="<%=ddlNationality.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Nationality" ID="lblNationality" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:DropDownList runat="server" ID="ddlNationality">
                                                        </asp:DropDownList>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </AjaxToolKit:TabPanel>

                        <AjaxToolKit:TabPanel ID="tbpAddress" runat="server" HeaderText="Address Information"
                            CssClass="menuHeader">
                            <HeaderTemplate>
                                <asp:Label ID="lblAddress" CssClass="menuHeader" runat="server" Text="Addresses & Contacts"></asp:Label>
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table cellpadding="3" cellspacing="3" width="100%">
                                    <tr>
                                        <td valign="top">
                                           <asp:UpdatePanel runat="server" ID="uplPAddress" UpdateMode="Conditional">
                                                <ContentTemplate>
                                                    <h3>Resident Address</h3>
                                                    <asp:CheckBox runat="server" ID="chkSameAsResident" Text="Same as Student's Resident Address"
                                                                Checked="false" OnCheckedChanged="chkSameAsResident_CheckedChanged" AutoPostBack="true" />
                                                     <div class="row_curved" id="divUnitNo" runat="server">
                                                        <label for="<%=txtUnitNo.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="UnitNo" ID="lblUnitNo" Width="120px" /></label>
                                                        <span class="indicator">
                                                            <asp:TextBox ID="txtUnitNo" Width="120px" MaxLength="20" runat="server" />
                                                            <asp:RequiredFieldValidator ID="rfvUnitNo" ValidationGroup="TeacherProfile" ControlToValidate="txtUnitNo"
                                                                runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                        </span>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                     <div class="row_curved" id="divStreetName" runat="server">
                                                        <label for="<%=txtStreetName.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="Street Name" ID="lblStreetName" Width="120px" /></label>
                                                        <span class="indicator">
                                                            <asp:TextBox ID="txtStreetName" Width="270px" MaxLength="255" runat="server" />
                                                            <asp:RequiredFieldValidator ID="rfvStreetName" ValidationGroup="TeacherProfile" ControlToValidate="txtStreetName"
                                                                runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                        </span>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                     <div class="row_curved" id="divCountry" runat="server">
                                                            <label for="<%=ddlCountry.ClientID%>" class="mand_red">
                                                                <asp:Label runat="server" Text="Country" ID="lblCountry" Width="120px" /></label>
                                                            <span class="indicator">
                                                                <asp:UpdatePanel runat="server" ID="uplRCountry">
                                                                    <ContentTemplate>
                                                                        <asp:DropDownList Width="100px" runat="server" ID="ddlCountry" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged"
                                                                            AutoPostBack="true">
                                                                        </asp:DropDownList>
                                                                    </ContentTemplate>
                                                                </asp:UpdatePanel>
                                                                <asp:RequiredFieldValidator ID="rfvCountry" ValidationGroup="TeacherProfile" ControlToValidate="ddlCountry"
                                                                    InitialValue="-1" runat="server" CssClass="validationErrorControl" Display="Dynamic"
                                                                    ErrorMessage=""></asp:RequiredFieldValidator>
                                                            </span>
                                                            <label for="<%=ddlDistrict.ClientID%>" style="width: 40px" class="mand_red">
                                                                <asp:Label runat="server" Text="Province" ID="lblDistrict" /></label><span class="indicator">
                                                                    <asp:UpdatePanel runat="server" ID="UpdatePanel3">
                                                                        <ContentTemplate>
                                                                            <asp:DropDownList Width="100px" runat="server" ID="ddlDistrict" OnSelectedIndexChanged="ddlDistrict_SelectedIndexChanged"
                                                                                AutoPostBack="true">
                                                                            </asp:DropDownList>
                                                                        </ContentTemplate>
                                                                    </asp:UpdatePanel>
                                                                    <asp:RequiredFieldValidator ID="rfvDistrict" ValidationGroup="TeacherProfile" ControlToValidate="ddlDistrict"
                                                                        InitialValue="-1" runat="server" CssClass="validationErrorControl" Display="Dynamic"
                                                                        ErrorMessage=""></asp:RequiredFieldValidator>
                                                                </span>
                                                            <div class="clear">
                                                            </div>
                                                        </div>
                                                     <div class="row_curved" id="divCity" runat="server">
                                                        <label for="<%=ddlCity.ClientID%>" class="mand_red">
                                                            <asp:Label runat="server" Text="City Name" ID="lblCity" Width="120px" /></label>
                                                        <span class="indicator">
                                                            <asp:UpdatePanel runat="server" ID="UpdatePanel4">
                                                                <ContentTemplate>
                                                                    <asp:DropDownList Width="100px" runat="server" ID="ddlCity">
                                                                    </asp:DropDownList>
                                                                </ContentTemplate>
                                                            </asp:UpdatePanel>
                                                            <asp:RequiredFieldValidator ID="rfvCity" ValidationGroup="TeacherProfile" ControlToValidate="ddlCity"
                                                                InitialValue="-1" runat="server" CssClass="validationErrorControl" Display="Dynamic"
                                                                ErrorMessage=""></asp:RequiredFieldValidator>
                                                        </span>
                                                        <label for="<%=txtPostCode.ClientID%>" style="width: 40px" class="mand_red">
                                                            <asp:Label runat="server" Text="Postal" ID="lblPostCode" /></label>
                                                        <span class="indicator">
                                                            <asp:TextBox Width="100px" ID="txtPostCode" MaxLength="50" runat="server" />
                                                            <asp:RequiredFieldValidator ID="rfvPostCode" ValidationGroup="TeacherProfile" ControlToValidate="txtPostCode"
                                                                runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                                        </span>
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                        </td>
                                        <td valign="top">
                                            <h3>Contact</h3>                                           
                                            <div class="row_curved" id="divMobileNumber" runat="server">
                                                <label for="<%=txtMobileNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Mobile" ID="lblMobileNumber" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtMobileNumber" MaxLength="50" runat="server" />
                                                        <asp:CustomValidator ID="csvContactNumbers" OnServerValidate="ContactNumbers_ServerSideValidate"
                                                            ValidationGroup="FamilyMemberProfile" ControlToValidate="txtMobileNumber" runat="server"
                                                            CssClass="validationErrorControl" Display="Dynamic" ErrorMessage=""></asp:CustomValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divHomePhoneNumber" runat="server">
                                                <label for="<%=txtHomePhoneNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Home Phone" ID="lblHomePhoneNumber" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtHomePhoneNumber" MaxLength="50" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>                                            
                                            <div class="row_curved" id="divOfficePhoneNumber" runat="server">
                                                <label for="<%=txtOfficePhoneNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Office Phone" ID="Label20" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtOfficePhoneNumber" MaxLength="50" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divFaxNumber" runat="server">
                                                <label for="<%=txtFaxNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Fax Number" ID="Label19" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtFaxNumber" MaxLength="50" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divOtherContactNumber" runat="server">
                                                <label for="<%=txtOtherContactNumber.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Other Contact" ID="lblOtherContactNumber" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="220px" ID="txtOtherContactNumber" MaxLength="50" runat="server" />
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divEmailAddress" runat="server" title="Example:example@domain.com">
                                                <label for="<%=txtEmailAddress.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Email Address(es)" ID="lblEmailAddressCaption" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox Width="270px" ID="txtEmailAddress" MaxLength="255" runat="server" />
                                                        <asp:RegularExpressionValidator ID="revEmailAddress" ValidationGroup="FamilyMemberProfile"
                                                            ControlToValidate="txtEmailAddress" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage="<br />Invalid email address format." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                            <div class="row_curved" id="divWebsiteUrl" runat="server" title="Example:http://www.example.com">
                                                <label for="<%=txtWebsiteUrl.ClientID%>" class="mand_red">
                                                    <asp:Label runat="server" Text="Website URL" ID="lblWebsiteUrl" /></label>
                                                <div class="field">
                                                    <span class="indicator">
                                                        <asp:TextBox ToolTip="http://www.example.com" Width="270px" ID="txtWebsiteUrl" MaxLength="255"
                                                            runat="server"></asp:TextBox>
                                                        <asp:RegularExpressionValidator ID="revWebsiteUrl" ValidationGroup="FamilyMemberProfile"
                                                            ControlToValidate="txtWebsiteUrl" runat="server" CssClass="validationErrorControl"
                                                            Display="Dynamic" ErrorMessage="<br />Invalid HTTP URL format." Text="" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
                                                    </span>
                                                </div>
                                                <div class="clear">
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </AjaxToolKit:TabPanel>

                    </AjaxToolKit:TabContainer>
                    <div class="row_curved" style="background-color: #efefef;" id="divButton" runat="server">
                        <label>
                            &nbsp;</label>
                        <div class="field" style="width: 650px;">
                            <span class="indicator">
                                <asp:Button ID="btnSubmit" CssClass="button_normal_submit" Text="Save" ValidationGroup="FamilyMemberProfile"
                                    OnClientClick="SubmitOnClientClick(this, 'FamilyMemberProfile');" runat="server"
                                    OnClick="btnSubmit_Click" /></span> &nbsp;&nbsp;<asp:Button runat="server" ID="btnNew"
                                        Text="New" CssClass="button_normal_submit" OnClick="btnAddNewFamily_Click" />
                            
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row_curved" id="divMessage" runat="server">
                        <label>
                            &nbsp;</label>
                        <div class="field">
                            <span class="indicator">
                                <asp:Label ID="lblMessage" runat="server"></asp:Label>
                            </span>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
    <script type="text/javascript">
            //<![CDATA[
    SetSumitNormalButtonAttribute(document.getElementById('<%=btnSubmit.ClientID%>'));
        //]]>
    </script>
</asp:Content>

